package com.xyz.graph.controller;

import com.xyz.graph.common.BaseController;
import com.xyz.graph.common.CommonResponse;
import com.xyz.graph.common.CommonResult;
import com.xyz.graph.common.annotation.OptimizeLog;
import com.xyz.graph.service.GManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "图管理")
@Slf4j
@RequestMapping("gmanage/v1/rest")
@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
public class GManageController extends BaseController {

    @Autowired
    private GManageService gManageService;

    @GetMapping(value = "/test")
    @ApiOperation(value = "test", notes = "test")
    @OptimizeLog
    public void test(){
        gManageService.getGSchema("janusgraph");

    }

    @GetMapping(value = "/dropGraph")
    @ApiOperation(value = "dropGraph", notes = "dropGraph")
    @OptimizeLog
    public void dropGraph(){
        gManageService.dropGraph();

    }
}
